<?php
   $user = $_POST["name"];
   $pass = $_POST["pass"];


   $conn = mysqli_connect("localhost:3306","root","root","tencent");
   if ($conn) {
      $sql = "insert into student(username,userpass)  values('$user','$pass')";
      $res = mysqli_query($conn,$sql);
      if ($res) {
         echo "success";
      } else {
         echo "fail";
      }
      
   } else {
     echo "connect error";
   }
?>